unit ufmSqlserversourcset;

{$mode Delphi}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls,
  StdCtrls, Spin, Buttons, Menus, EditBtn, dbstructures.mssql;

type

  { TFmSQLServerSet }

  TFmSQLServerSet = class(TForm)
    CBAuthentication: TComboBox;
    chkSSHActive: TCheckBox;
    chkWantSSL: TCheckBox;
    comboSSHExe: TComboBox;
    EDHost: TEdit;
    EdConnectName: TEdit;
    EdDatabase: TEdit;
    editSSHhost: TEdit;
    editSSHlocalport: TEdit;
    editSSHPassword: TEdit;
    editSSHport: TEdit;
    editSSHPrivateKey: TEdit;
    editSSHTimeout: TEdit;
    editSSHUser: TEdit;
    editSSLCACertificate: TEditButton;
    editSSLCertificate: TEditButton;
    editSSLcipher: TEdit;
    editSSLPrivateKey: TEditButton;
    Edpass: TEdit;
    EdUser: TEdit;
    Label13: TLabel;
    Label2: TLabel;
    Label9: TLabel;
    LabelAuth: TLabel;
    LabelDataBases: TLabel;
    LabelHost: TLabel;
    LabelPWD: TLabel;
    lblSSHExe: TLabel;
    lblSSHhost: TLabel;
    lblSSHkeyfile: TLabel;
    lblSSHLocalPort: TLabel;
    lblSSHPassword: TLabel;
    lblSSHTimeout: TLabel;
    lblSSHUser: TLabel;
    lblSSLCACertificate: TLabel;
    lblSSLCertificate: TLabel;
    lblSSLcipher: TLabel;
    lblSSLPrivateKey: TLabel;
    PageControl1: TPageControl;
    Panel10: TPanel;
    Panel5: TPanel;
    Panel6: TPanel;
    Panel7: TPanel;
    Panel9: TPanel;
    panelOption: TPanel;
    SPBTestConnect: TSpeedButton;
    SPBOK: TSpeedButton;
    SPBCancle: TSpeedButton;
    SpinEditPort: TSpinEdit;
    TabAdvance: TTabSheet;
    TabGeneral: TTabSheet;
    tabOption: TTabSheet;
    TabSchemas: TTabSheet;
    tabSSL: TTabSheet;
    TabSSH: TTabSheet;
    TreeView1: TTreeView;
    updownSSHTimeout: TUpDown;
    procedure FormCreate(Sender: TObject);
    procedure SPBCancleClick(Sender: TObject);
    procedure SPBOKClick(Sender: TObject);
    procedure SPBTestConnectClick(Sender: TObject);
  private

  public
    isNew: Boolean;
    TabSheet: TTabSheet;
  end;

var
  FmSQLServerSet: TFmSQLServerSet;

implementation

{$R *.lfm}

{ TFmSQLServerSet }

procedure TFmSQLServerSet.SPBOKClick(Sender: TObject);
begin
  self.ModalResult := mrOk;
end;

procedure TFmSQLServerSet.SPBTestConnectClick(Sender: TObject);
begin

end;

procedure TFmSQLServerSet.SPBCancleClick(Sender: TObject);
begin
  self.ModalResult := mrCancel;
end;

procedure TFmSQLServerSet.FormCreate(Sender: TObject);
begin
  self.EdDatabase.Text := 'master';

  CBAuthentication.Items.Clear;
  CBAuthentication.Items.AddObject('请选择', TObject(sqlAuthNone));
  CBAuthentication.Items.AddObject('windows身份证验证', TObject(sqlAuthWindows));
  CBAuthentication.Items.AddObject('数据库身份验证模式', TObject(sqlAuthUser));

end;

end.
